﻿using ClientAppraise.Controls;
using ClientAppraise.ViewModels.Pages.Users.Org;
using ClientAppraise.ViewModels.Pages.Users.Org.Admin;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace ClientAppraise.Views.Pages.Users.Org.Admin
{
    /// <summary>
    /// IndexPage.xaml 的交互逻辑
    /// </summary>
    public partial class IndexPage : IZxNavigableView<IndexViewModel>
    {
        public IndexViewModel ViewModel { get; }
        public IndexPage(IndexViewModel viewModel)
        {
            ViewModel = viewModel;
            DataContext = this;

            InitializeComponent();

            this.Loaded += IndexPage_Loaded;
        }

        private async void IndexPage_Loaded(object sender, RoutedEventArgs e)
        {
            App.TitleRight.Show(TitleRightControl);

           await ViewModel.RefreshOrgListAsync();
        }

    }
}
